package com.itheima.evaluate.controller;

import com.car.model.common.dtos.ResponseResult;
import com.car.model.evaluate.dtos.AccessoriesEvaluationDto;
import com.itheima.apis.evaluate.AccessoriesEvaluationControllerApi;
import com.itheima.evaluate.service.AccessoriesEvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/accEvaluation")
public class AccessoriesEvaluationController implements AccessoriesEvaluationControllerApi {


    @Autowired
    private AccessoriesEvaluationService service;

    @GetMapping("/findOne/{orderId}/{customerId}")
    public ResponseResult findOne(@PathVariable("orderId") Integer orderId,@PathVariable("customerId") Integer customerId) {
        return service.findOne(orderId,customerId);
    }

    @PostMapping("/findPage")
    @Override
    public ResponseResult findPage(@RequestBody AccessoriesEvaluationDto dto) {
        return service.findPage(dto);
    }
}
